package cn.lili.controller.feign.order;

import cn.lili.modules.order.order.client.RefundOrderStatisticsClient;
import cn.lili.modules.order.order.service.RefundOrderStatisticsService;
import cn.lili.modules.statistics.entity.dto.StatisticsQueryParam;
import cn.lili.modules.statistics.entity.vo.RefundOrderStatisticsDataVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author paulG
 * @since 2022/6/28
 **/
@RestController
@RequiredArgsConstructor
public class RefundOrderStatisticsFeignController implements RefundOrderStatisticsClient {

    private final RefundOrderStatisticsService refundOrderStatisticsService;

    @Override
    public Page<RefundOrderStatisticsDataVO> getRefundOrderStatisticsData(StatisticsQueryParam statisticsQueryParam) {
        return refundOrderStatisticsService.getRefundOrderStatisticsData(statisticsQueryParam, statisticsQueryParam);
    }

    @Override
    public Double getRefundOrderStatisticsPrice(StatisticsQueryParam statisticsQueryParam) {
        return refundOrderStatisticsService.getRefundOrderStatisticsPrice(statisticsQueryParam);
    }
}
